package com.mydemo.design_pattern.action_type.observer_pattern;


import com.mydemo.design_pattern.action_type.observer_pattern.impl.BinaryObserver;
import com.mydemo.design_pattern.action_type.observer_pattern.impl.HexaObserver;
import com.mydemo.design_pattern.action_type.observer_pattern.impl.OctalObserver;

/**
 * <p></p >
 *
 * @author liming1
 * @version $Id: TestDemo, v1.0 2019-09-23 14:49 liming1 Exp $
 */
public class TestDemo {
    public static void main(String[] args) {
        Subject subject = new Subject();

        new HexaObserver(subject);
        new OctalObserver(subject);
        new BinaryObserver(subject);

        System.out.println("First state change: 15");
        subject.setState(15);
        System.out.println("Second state change: 10");
        subject.setState(10);
    }
}
